﻿@model PrivateMessageModel
@{
    Layout = "_ColumnsOne";

    Html.AddTitleParts(T("PageTitle.ViewPM").Text);
}
<div class="page private-messages private-message-view-page">
    <h1 class="h4 generalTitle text-xs-center">@T("PrivateMessages.View.ViewMessage")</h1>
    <div class="card view-message pb-3">
        <div class="card-header">
            <label><strong>@T("PrivateMessages.View.Subject")</strong></label>
            <span>@Model.Subject</span>
        </div>
        <div class="card-body mb-3">
            <div class="message-body pb-3">
                @Html.Raw(Model.Message)
            </div>
        </div>
        <div class="card-footer">
            <label><strong>@T("PrivateMessages.View.From")</strong></label>
            <span>@Model.CustomerFromName</span>
            <label><strong>@T("PrivateMessages.View.To")</strong></label>
            <span>@Model.CustomerToName</span>
        </div>
    </div>
        <div class="btn-group btn-group-sm btn-group-sm bt-1 mb-1">
            <input type="button" class="btn btn-secondary reply-pm-button" value="@T("PrivateMessages.View.ReplyButton")" onclick="setLocation('@Url.RouteUrl("SendPMReply", new { toCustomerId = Model.FromCustomerId, replyToMessageId = Model.Id })')" />
            <input type="button" class="btn btn-secondary delete-pm-button" value="@T("PrivateMessages.View.DeleteButton")" onclick="setLocation('@Url.RouteUrl("DeletePM", new { privateMessageId = Model.Id })')" />
            <input type="button" class="btn btn-secondary back-pm-button" value="@T("PrivateMessages.View.BackButton")" onclick="setLocation('@Url.RouteUrl("PrivateMessages")')" />
        </div>
</div>